package pl.javarsovia.javarsovia4android.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author mgrzechocinski
 * @since 2010-06-12
 */
@SuppressWarnings("serial")
public class Slot implements Identifiable, Serializable {

	private String id;
	private String start;
	private String finish;
	transient private List<Lecture> lectures = new ArrayList<Lecture>();

	public Slot(String id) {
		this.id = id;
	}

	public String getStart() {
		return start;
	}

	@Override
	public String getId() {
		return id;
	}

	public String getFinish() {
		return finish;
	}

	public Slot start(String start) {
		this.start = start;
		return this;
	}

	public Slot finish(String finish) {
		this.finish = finish;
		return this;
	}

	@Override
	public String toString() {
		return start + "-" + finish;
	}

	public List<Lecture> getLectures() {
		return lectures;
	}

	public void addLecture(Lecture lecture) {
		this.lectures.add(lecture);
	}
}
